<!--  -->
<template>
<div class="">
    <a-drawer :visible="modalVisible" width="60%" @close="handleClose">
        <f-search-form>
            <f-search-form-item label="项目代码" name="userName" />
            <f-search-form-item label="项目名称" name="account" />
            <f-search-form-item label="工程代码" name="EegineeringCode" />
        </f-search-form>
        <a-button type="dashed"> 下载 </a-button>
        <f-table ref="table" size="default" :columns="columns" :multiple="false" :dataSource="datasource" :scroll="{ x: 1400 }" order="createTime" />
    </a-drawer>
</div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
    //import引入的组件需要注入到对象中才能使用
    name: 'catReport',
    components: {},
    props: {},
    data() {
        //这里存放数据
        return {
            modalVisible: false,
            columns: [{
                    title: '场次',
                    align: 'center',
                    dataIndex: 'sessions',
                },
                {
                    title: '项目名称',
                    align: 'center',
                    dataIndex: 'projectName',
                },
                {
                    title: '规格型号',
                    align: 'center',
                    dataIndex: 'specificationType',
                },
                {
                    title: '换算单位',
                    align: 'center',
                    dataIndex: 'unit',
                },
                {
                    title: '合同数量',
                    align: 'center',
                    dataIndex: 'contractNumber',
                },
                {
                    title: '材料单价',
                    align: 'center',
                    dataIndex: 'materialUnitPrice',
                },
                {
                    title: '劳务单价',
                    align: 'center',
                    dataIndex: 'labourServiceUnitPrice',
                },
                {
                    title: '材料合价',
                    align: 'center',
                    dataIndex: 'materialSumPrice',
                },
                {
                    title: '劳务合价',
                    align: 'center',
                    dataIndex: 'labourServiceSumPrice',
                },
                {
                    title: '总价',
                    align: 'center',
                    dataIndex: 'totalPrice',
                },
                {
                    title: '本次申报完成量',
                    align: 'center',
                    dataIndex: 'thisTimeReportFinishNumber',
                    width: 140,
                },
                {
                    title: '本次确认完成量',
                    align: 'center',
                    dataIndex: 'thisTimeconfirmFinishNumber',
                    width: 140,
                },
                {
                    title: '累计申报完成量',
                    align: 'center',
                    dataIndex: 'cumulativeReportFinishNumber',
                    width: 140,
                },
                {
                    title: '累计确认完成量',
                    align: 'center',
                    dataIndex: 'cumulativeConfirmFinishNumber',
                    width: 140,
                },
            ],
            datasource: [{
                    sessions: '场次1',
                    projectName: '项目1',
                    specificationType: 'w2rj23',
                    unit: 'M',
                    contractNumber: '22',
                    materialUnitPrice: '77.00',
                    labourServiceUnitPrice: '22.00',
                    materialSumPrice: '2773.00',
                    labourServiceSumPrice: '222.00',
                    totalPrice: '2995.00',
                    thisTimeReportFinishNumber: '22',
                    thisTimeconfirmFinishNumber: '22',
                    cumulativeReportFinishNumber: '55',
                    cumulativeConfirmFinishNumber: '50',
                },
                {
                    sessions: '场次2',
                    projectName: '项目2',
                    specificationType: 'we2232',
                    unit: 'M',
                    contractNumber: '13',
                    materialUnitPrice: '33.00',
                    labourServiceUnitPrice: '24.00',
                    materialSumPrice: '2000.00',
                    labourServiceSumPrice: '3000.00',
                    totalPrice: '5000.00',
                    thisTimeReportFinishNumber: '22',
                    thisTimeconfirmFinishNumber: '22',
                    cumulativeReportFinishNumber: '55',
                    cumulativeConfirmFinishNumber: '50',
                },
                {
                    sessions: '场次3',
                    projectName: '项目3',
                    specificationType: 'w2rj23',
                    unit: 'M',
                    contractNumber: '22',
                    materialUnitPrice: '77.00',
                    labourServiceUnitPrice: '22.00',
                    materialSumPrice: '2773.00',
                    labourServiceSumPrice: '222.00',
                    totalPrice: '2995.00',
                    thisTimeReportFinishNumber: '22',
                    thisTimeconfirmFinishNumber: '22',
                    cumulativeReportFinishNumber: '55',
                    cumulativeConfirmFinishNumber: '50',
                },
                {
                    sessions: '场次4',
                    projectName: '项目4',
                    specificationType: 'w2rj23',
                    unit: 'M',
                    contractNumber: '22',
                    materialUnitPrice: '77.00',
                    labourServiceUnitPrice: '22.00',
                    materialSumPrice: '2773.00',
                    labourServiceSumPrice: '222.00',
                    totalPrice: '2995.00',
                    thisTimeReportFinishNumber: '22',
                    thisTimeconfirmFinishNumber: '22',
                    cumulativeReportFinishNumber: '55',
                    cumulativeConfirmFinishNumber: '50',
                },
                {
                    sessions: '场次5',
                    projectName: '项目5',
                    specificationType: 'w2rj23',
                    unit: 'M',
                    contractNumber: '22',
                    materialUnitPrice: '77.00',
                    labourServiceUnitPrice: '22.00',
                    materialSumPrice: '2773.00',
                    labourServiceSumPrice: '222.00',
                    totalPrice: '2995.00',
                    thisTimeReportFinishNumber: '22',
                    thisTimeconfirmFinishNumber: '22',
                    cumulativeReportFinishNumber: '55',
                    cumulativeConfirmFinishNumber: '50',
                },
            ],
        }
    },
    //监听属性 类似于data概念
    computed: {},
    //监控data中的数据变化
    watch: {},
    //方法集合
    methods: {
        handleShow(data) {
            this.isEdit = false
            this.userName = ''
            if (data && data.userId) {
                this.isEdit = true
                this.userName = data.userName
                this.formData = data
            } else {
                this.formData = {}
            }
            this.modalVisible = true
            this.handleTabClick('form1')
        },
        handleClose() {
            //this.$refs[this.current].handleReset()
            this.modalVisible = false
        },
    },
    //生命周期 - 创建完成（可以访问当前this实例）
    created() {},
    //生命周期 - 挂载完成（可以访问DOM元素）
    mounted() {},
    beforeCreate() {}, //生命周期 - 创建之前
    beforeMount() {}, //生命周期 - 挂载之前
    beforeUpdate() {}, //生命周期 - 更新之前
    updated() {}, //生命周期 - 更新之后
    beforeDestroy() {}, //生命周期 - 销毁之前
    destroyed() {}, //生命周期 - 销毁完成
    activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
}
</script>

<style lang="scss" scoped>
//@import url(); 引入公共css类
</style>
